#include <stdio.h>
#include <stdlib.h>


void TestFunction(int *arr, int x, int y, double *sum);

int main()
{
    int *list_buf;
    double total[4] = {0.0,0.0,0.0,0.0};

    list_buf = (int*)malloc(1024 * sizeof(int));

    int x = 2;
    int y = 3;
    TestFunction(list_buf, x, y, total);

    free(list_buf);
    return 0;
}

void TestFunction(int *arr, int x, int y, double *sum)//c语言的形参是从右到左入栈的
{
    int val = 0;

    if((x + y) < 1024)
    {
        val = arr[x + y];
    }

    sum[val & 3] += val;
}
